const express=require('express');
const db=require('../utils/db');

const router=express.Router();
//增加
router.post('/takeNum',(req,res)=>{
	console.log(req.body);
	const sql=`select * from dininghall d,queueup q  where d.id='${req.body.id}' and q.hall_id=d.id`;
	db.query(sql,(err,data)=>{
		if(err){
			res.send({msg:err});
		}else{
			res.send(data)
		}
	})
})

module.exports=router;